
// 定位
@mixin set-position(
  $top: 0,
  $left: 0,
  $position: absolute,
  $right: unset,
  $bottom: unset
) {
  position: $position;
  top: $top;
  left: $left;
  right: $right;
  bottom: $bottom;
}

// 默认水平垂直居中
@mixin absolute-center($left: 50%, $top: 50%, $X: -50%, $Y: -50%) {
  position: absolute;
  left: $left;
  top: $top;
  transform: translate($X, $Y);
}

// 图片
@mixin image-style($width, $height, $radius: 0) {
  display: block;
  width: $width;
  height: $height;
  border-radius: $radius;
}

@mixin grid-division($piece, $gap: 0) {
  display: grid;
  grid-template-columns: repeat($piece, 1fr);
  grid-gap: $gap;
}